/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.swirrel.component;

import java.awt.Frame;
import java.awt.GraphicsConfiguration;
import java.awt.HeadlessException;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;
import org.swirrel.Swirrel;

/**
 *
 * @author Gronau
 */
public class SwAwtFrame extends Frame {

    private WindowListener processListener = new WindowAdapter() {
        @Override
        public void windowOpened(WindowEvent we) {
            process();
        }
    };

    {
        this.addWindowListener(processListener);
    }
    public SwAwtFrame() throws HeadlessException {
        super("");
    }

    public SwAwtFrame(GraphicsConfiguration gc) {
        super("", gc);
    }

    public SwAwtFrame(String title) throws HeadlessException {
        super(title);
    }

    public SwAwtFrame(String title, GraphicsConfiguration gc) {
        super(title, gc);
    }

    public void process() {
        Swirrel.process(this);
    }

}
